<template>
  <div class="container">
    <el-dialog
      title="区域明细详情"
      :visible.sync="particularsDialogs.centerDialogVisible"
      @open="getData"
      @close="confirm"
      center
    >
      <el-table
        :data="tableData"
        border
        style="width: 100%"
        empty-text="暂无数据"
      >
        <el-table-column
          prop="house_name"
          label="仓库名称"
          align="center"
        ></el-table-column>
        <el-table-column
          prop="house_code"
          label="仓库编码"
          align="center"
        ></el-table-column>
        <el-table-column
          prop="create_id"
          label="创建人ID"
          align="center"
        ></el-table-column>
        <el-table-column
          prop="created_at"
          label="创建时间"
          align="center"
        ></el-table-column>
        <el-table-column
          prop="update_id"
          label="编辑人ID"
          align="center"
        ></el-table-column>
        <el-table-column
          prop="updated_at"
          label="编辑时间"
          align="center"
        ></el-table-column>
        <!-- <el-table-column
          prop="typeStr"
          label="状态"
          align="center"
        ></el-table-column> -->
        <el-table-column
          prop="deleted_at"
          label="删除时间"
          align="center"
        ></el-table-column>
      </el-table>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="confirm">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import { Warehouseedit } from "@/api/warehouse/warehouse";
export default {
  props: {
    particularsDialogs: Object,
  },
  data() {
    return {
      tableData: [],
    };
  },
  created() {},
  methods: {
    //关闭
    confirm() {
      this.particularsDialogs.centerDialogVisible = false;
    },
    // 获取数据
    getData() {
      this.tableData = [];
      this.center = [];
      let data = {
        id: this.particularsDialogs.id,
      };
      Warehouseedit(data).then((res) => {
        if (res.code == 0) {
          let region = res.data;
          var regionList = [];
          regionList.push(region);
          // regionList.forEach((res) => {
          //   res.typeStr = res.is_del == 1 ? "删除" : "正常";
          // });
          this.tableData = regionList;
        }
      });
    },
  },
};
</script>
<style scoped>
.pagination {
  text-align: right;
  padding: 10px;
  background-size: cover;
}
</style>